- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
          Make some std::io functions const
          #78811
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
                
     Merged
            
            
          Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    Includes: - io::Cursor::new - io::Cursor::get_ref - io::Cursor::position - io::empty - io::repeat - io::sink
      
        
      
      
  
    3 tasks
  
              
                    dtolnay
  
              
              approved these changes
              
                  
                    Nov 6, 2020 
                  
              
              
            
            
| 
           @bors r+  | 
    
| 
           📌 Commit 001dd7e has been approved by   | 
    
    
  m-ou-se 
      added a commit
        to m-ou-se/rust
      that referenced
      this pull request
    
      Nov 7, 2020 
    
    
      
  
    
      
    
  
Make some std::io functions `const` Tracking issue: rust-lang#78812 Make the following functions `const`: - `io::Cursor::new` - `io::Cursor::get_ref` - `io::Cursor::position` - `io::empty` - `io::repeat` - `io::sink` r? `@dtolnay`
    
  m-ou-se 
      added a commit
        to m-ou-se/rust
      that referenced
      this pull request
    
      Nov 7, 2020 
    
    
      
  
    
      
    
  
Make some std::io functions `const` Tracking issue: rust-lang#78812 Make the following functions `const`: - `io::Cursor::new` - `io::Cursor::get_ref` - `io::Cursor::position` - `io::empty` - `io::repeat` - `io::sink` r? ``@dtolnay``
    
  m-ou-se 
      added a commit
        to m-ou-se/rust
      that referenced
      this pull request
    
      Nov 7, 2020 
    
    
      
  
    
      
    
  
Make some std::io functions `const` Tracking issue: rust-lang#78812 Make the following functions `const`: - `io::Cursor::new` - `io::Cursor::get_ref` - `io::Cursor::position` - `io::empty` - `io::repeat` - `io::sink` r? ```@dtolnay```
    
  m-ou-se 
      added a commit
        to m-ou-se/rust
      that referenced
      this pull request
    
      Nov 7, 2020 
    
    
      
  
    
      
    
  
Make some std::io functions `const` Tracking issue: rust-lang#78812 Make the following functions `const`: - `io::Cursor::new` - `io::Cursor::get_ref` - `io::Cursor::position` - `io::empty` - `io::repeat` - `io::sink` r? ````@dtolnay````
    
  bors 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Nov 8, 2020 
    
    
      
  
    
      
    
  
Rollup of 19 pull requests Successful merges: - rust-lang#76097 (Stabilize hint::spin_loop) - rust-lang#76227 (Stabilize `Poll::is_ready` and `is_pending` as const) - rust-lang#78065 (make concurrency helper more pleasant to read) - rust-lang#78570 (Remove FIXME comment in print_type_sizes ui test suite) - rust-lang#78572 (Use SOCK_CLOEXEC and accept4() on more platforms.) - rust-lang#78658 (Add a tool to run `x.py` from any subdirectory) - rust-lang#78706 (Fix run-make tests running when LLVM is disabled) - rust-lang#78728 (Constantify `UnsafeCell::into_inner` and related) - rust-lang#78775 (Bump Rustfmt and RLS) - rust-lang#78788 (Correct unsigned equivalent of isize to be usize) - rust-lang#78811 (Make some std::io functions `const`) - rust-lang#78828 (use single char patterns for split() (clippy::single_char_pattern)) - rust-lang#78841 (Small cleanup in `TypeFoldable` derive macro) - rust-lang#78842 (Honor the rustfmt setting in config.toml) - rust-lang#78843 (Less verbose debug logging from inlining integrator) - rust-lang#78852 (Convert a bunch of intra-doc links) - rust-lang#78860 (rustc_resolve: Use `#![feature(format_args_capture)]`) - rust-lang#78861 (typo and formatting) - rust-lang#78865 (Don't fire `CONST_ITEM_MUTATION` lint when borrowing a deref) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
    
  RalfJung 
      added a commit
        to RalfJung/rust
      that referenced
      this pull request
    
      Apr 17, 2024 
    
    
      
  
    
      
    
  
…ze, r=jhpratt Stabilize `const_io_structs` This PR stabilizes `const_io_structs`. Tracking issue: rust-lang#78812. Implementation PR: rust-lang#78811. FCPs already completed in the tracking issue. Closes rust-lang#78812. `@rustbot` label: +T-libs-api r? libs-api
    
  GuillaumeGomez 
      added a commit
        to GuillaumeGomez/rust
      that referenced
      this pull request
    
      Apr 17, 2024 
    
    
      
  
    
      
    
  
…ze, r=jhpratt Stabilize `const_io_structs` This PR stabilizes `const_io_structs`. Tracking issue: rust-lang#78812. Implementation PR: rust-lang#78811. FCPs already completed in the tracking issue. Closes rust-lang#78812. ``@rustbot`` label: +T-libs-api r? libs-api
    
  RalfJung 
      added a commit
        to RalfJung/rust
      that referenced
      this pull request
    
      Apr 17, 2024 
    
    
      
  
    
      
    
  
…ze, r=jhpratt Stabilize `const_io_structs` This PR stabilizes `const_io_structs`. Tracking issue: rust-lang#78812. Implementation PR: rust-lang#78811. FCPs already completed in the tracking issue. Closes rust-lang#78812. ``@rustbot`` label: +T-libs-api r? libs-api
    
  matthiaskrgr 
      added a commit
        to matthiaskrgr/rust
      that referenced
      this pull request
    
      Apr 17, 2024 
    
    
      
  
    
      
    
  
…ze, r=jhpratt Stabilize `const_io_structs` This PR stabilizes `const_io_structs`. Tracking issue: rust-lang#78812. Implementation PR: rust-lang#78811. FCPs already completed in the tracking issue. Closes rust-lang#78812. ```@rustbot``` label: +T-libs-api r? libs-api
    
  rust-timer 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Apr 17, 2024 
    
    
      
  
    
      
    
  
Rollup merge of rust-lang#124049 - slanterns:const_io_structs_stabilize, r=jhpratt Stabilize `const_io_structs` This PR stabilizes `const_io_structs`. Tracking issue: rust-lang#78812. Implementation PR: rust-lang#78811. FCPs already completed in the tracking issue. Closes rust-lang#78812. ```@rustbot``` label: +T-libs-api r? libs-api
    
  RalfJung 
      pushed a commit
        to RalfJung/miri
      that referenced
      this pull request
    
      Apr 17, 2024 
    
    
      
  
    
      
    
  
…ratt Stabilize `const_io_structs` This PR stabilizes `const_io_structs`. Tracking issue: rust-lang/rust#78812. Implementation PR: rust-lang/rust#78811. FCPs already completed in the tracking issue. Closes rust-lang/rust#78812. ```@rustbot``` label: +T-libs-api r? libs-api
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      Labels
      
    S-waiting-on-bors
  Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Tracking issue: #78812
Make the following functions
const:io::Cursor::newio::Cursor::get_refio::Cursor::positionio::emptyio::repeatio::sinkr? @dtolnay